/**
 * Created by Fred(qq:24242811) on 2019/1/10.
 */
const Route = use('Route')
const Env = use('Env')

// 无需登录
// Route.group(() => {
//   Route.post('code', 'UserController.code')
//   Route.post('login', 'UserController.login')
//   Route.post('oneStepUserInfo', 'UserController.getUserInfo')
//   Route.post('getGiftFromUserCoupon', 'UserController.getGiftFromUserCoupon')
//   Route.post('putUserInfo', 'UserController.putUserInfo')
//   Route.post('getVin', 'UserController.getVin')
//   Route.post('getOrderList', 'UserController.getOrderList')
//   Route.post('helpUser', 'UserController.helpUser')
//   Route.post('openGift', 'UserController.openGift')
//   Route.post('helpMeList', 'UserController.helpMeList')
//   Route.post('myGotGiftList', 'UserController.myGotGiftList')
//   Route.post('myGotGiftWithTimesList', 'UserController.myGotGiftWithTimesList')
//   Route.post('loadUserPuzzle', 'UserController.loadUserPuzzle')
//   Route.post('myGotGiftCount', 'UserController.myGotGiftCount')
//   Route.post('updateLogistics', 'UserController.updateLogistics')
//   Route.post('top10UserList', 'UserController.top10UserList')
//   Route.post('antiHelpRobotTest', 'UserController.antiHelpRobotTest')
//   Route.post('antiOpenRobotTest', 'UserController.antiOpenRobotTest')
//   Route.get('getDriveAddress', 'UserController.getDriveAddress')
// }).prefix('admin/')
//   .namespace('Admin')


Route.group(() => {
  Route.get('createUser', 'DebuggerController.createUser')
  Route.post('login', 'AdminController.login')
}).prefix('admin/')
  .namespace('Admin')

Route.group(() => {
  Route.get('getUserInfo', 'AdminController.getUserInfo')
  Route.resource('receipt', 'ReceiptController')
  Route.resource('wantbuy', 'WantbuyController')
}).prefix('admin/')
  .namespace('Admin')
  .middleware(['adminAuth'])
